#include <bits/stdc++.h>
using namespace std;

typedef long long LL;
LL x, ret;
int main()
{
    cin >> x;

    LL k = (LL)sqrt(x);
    LL left = k * k;
    LL right = (k + 1) * (k + 1);

    ret = abs(x - left);
    if (ret < abs(right - x)) cout << left << endl;
    else cout << right << endl;
    return 0;
}